package com.cyt.work.wb.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 维保模块-服务商表实体类
 *
 * @author shengQiang Yu
 * @date 2019-11-28 9:28:43
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_wb_servicer")
public class WbServicer implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 应用id
     */ 
	@Column(name = "apply_id")
	private String applyId;

	/**
     * 服务商名称
     */ 
	@Column(name = "name")
	private String name;

	/**
     * 负责人
     */ 
	@Column(name = "principal")
	private String principal;

	/**
     * 手机号
     */ 
	@Column(name = "mobile")
	private String mobile;

	/**
     * 座机号
     */ 
	@Column(name = "phone")
	private String phone;

	/**
     * 服务商类型
     */ 
	@Column(name = "type")
	private String type;

	/**
     * 地址
     */ 
	@Column(name = "address")
	private String address;

	/**
     * 资质详情
     */ 
	@Column(name = "description")
	private String description;

	/**
     * 分派员
     */ 
	@Column(name = "user_id")
	private String userId;

	/**
     * 备注信息
     */ 
	@Column(name = "remarks")
	private String remarks;

	/**
     * 排序
     */ 
	@Column(name = "sort")
	private Integer sort;

	/**
     * 删除标识
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author shengQiang Yu
	 * @date 2019-11-28 9:28:43
	 */
	public WbServicer(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}